import { Entity, Column, OneToMany } from 'typeorm';
import { BaseEntity } from '../../../common/base.entity';
import User from '../../user/entity/user';

@Entity('sys_storeManage')
export class StoreManageEntity extends BaseEntity {

  @Column({ comment: '门店名称' })
  name?: string;

  @Column({ comment: '门店位置' })
  address?: string;

  @Column({ comment: '门店房间数' })
  room_count?: number;

  @Column({ comment: '门店大小' })
  size?: number;

  @Column({ comment: '门店剩余房间数' })
  free_room_count?: number;

  @Column({ comment: '联系电话' })
  phone?: string;

  @Column({ comment: '门店状态' })
  status?: string;

  @OneToMany(() => User, (user) => user.store)
  users?: User[];
  
  @Column({ comment: '备注' })
  remark?: string;
}